home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / MacTools / HyperStation / HyperStation / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1988-03-21  |  4.0 KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>5</cardCount>
  7.     <cardID>2832</cardID>
  8.     <listID>4186</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>on openstack---- HyperStation interacts very heavily with Hypercard and relies-- on the existence of the following global containers.  If you write-- your own script, just cut and paste these two lines.  HyperStation-- will do the rest.--global globalATPData, globalNBPData, globalSktDataglobal globalResponseDataglobal globalReceiveData, myEntityName, atReady, messagesput empty into globalResponseDataput empty into globalATPDataput empty into globalNBPDataput false into atready---- Since we're not on the newtork yet, the "Finder" should be empty.-- This erases all vestigial icons from the finder screen.--set lockscreen to truehide background button "memo"set userlevel to 5choose button toolrepeat with i = 1 to the number of card buttonsset the rect of card button 1 to "40,40,50,50"click at the loc of card button 1doMenu "Cut Button"end repeatchoose browse toolset lockscreen to false---- Before we can become an entity on the network, we must first-- open up access to the network.  ATOPEN performs this fucntion-- and relies on the container "globalappleTalkData".  DO NOT-- use Hyperstation unless your stack defines this global.---- Since ATOpen is not given a parameter, it will open both a client-- and a server side allowing us to both issue requests and respond-- to requests from this node.--ATPOpenput the result into itif "no error" is in it then---- if ATOpen was successful, we can go ahead and register our name-- with the network. If no name is specified (as is the case here),-- then the name selected in the chooser will be used.--NBPOpenNBPRegisterName empty,"HyperStation"put the result into itif "no error" is in it  then---- You're connected and ready to go.  Remember, you'll need-- to do a lookup using the lookup button before you can talk-- to any servers.--answer "Welcome to HyperStation!" with "ok"put true into atreadyend ifend ifend openstackon closestackput false into atreadyput empty into GlobalResponseDataput empty into GlobalATPDataput empty into GlobalNBPData--hide background button "memo"NBPCloseATPCloseend closestackon idleglobal atreadyif atready thenATPReceive "HandleRequest"end if--pass idleend idleon HandleRequestglobal globalResponseData---- A client has issued a request for some data.  Acting as a well-- behaved server, we fill the response data with some information-- Since this method was called from the ATReceive xcmd, it will-- return there upon completion causing the response to be sent-- out "magically".  If the response container is blank, the-- server will "autorespond".  Note that responses are limited to-- to 4624 characters.  This is a fundamental limitation of the-- AppleTalk ATP layer.  If you send more than 4624 characters,-- the response will be truncated for you.--visual effect wipe rightgo card "in box"put card field "response" into globalResponseDataend HandleRequeston HandleResponseglobal globalReceiveData---- A server is returning a response to a previously queued request.-- Note that in order to handle a response correctly, you need to-- specify this or some other method in your ATRequest call.-- The response data has been placed in the globalReceiveData-- container for you.  All you have to do is look at it.--if globalReceiveData is not empty thenpush cardset lockscreen to truego card "in box"get the number of lines in card field "messages"add 1 to itput globalReceiveData into line it of card field "messages"pop cardset lockscreen to falseend ifend HandleResponseon okay---- The method handles the default server response (It is not needed-- by clients). Iif you